package edu.mobbuzz.page.menu;

import com.sun.lwuit.Command;
import com.sun.lwuit.events.ActionListener;
import edu.mobbuzz.storage.CategoryRecordStore;
import edu.mobbuzz.storage.ContactRecordStore;
import edu.mobbuzz.storage.RSSCategoryRecordStore;
import edu.mobbuzz.storage.RSSChannelRecordStore;



public abstract class BaseMenu{
    
    public abstract String getMenuTitle();
    public abstract void showPage();

    private Command onlineCmd;
    private Command exitCmd;
    private ActionListener actionlistener;

    private ContactRecordStore contactRS;
    private RSSChannelRecordStore rssChannelRS;
    private RSSCategoryRecordStore rssCategoryRS;
    private CategoryRecordStore categoryRS;
    
    public Command getOnlineCmd() {
        if(onlineCmd==null){
            onlineCmd = new Command("Go Online");
        }
        return onlineCmd;
    }
    public Command getExitCmd() {
        return exitCmd;
    }

    public void setExitCmd(Command exitCmd) {
        this.exitCmd = exitCmd;
    }

    public ActionListener getActionlistener() {
        return actionlistener;
    }

    public void setActionlistener(ActionListener actionlistener) {
        this.actionlistener = actionlistener;
    }

    public ContactRecordStore getContactRS() {
        if(contactRS==null){
            contactRS = new ContactRecordStore();
        }
        return contactRS;
    }

    public void setContactRS(ContactRecordStore contactRS) {
        this.contactRS = contactRS;
    }

    public RSSChannelRecordStore getRssChannelRS() {
        if(rssChannelRS==null){
            rssChannelRS = new RSSChannelRecordStore();
        }
        return rssChannelRS;
    }

    public void setRssChannelRS(RSSChannelRecordStore rssChannelRS) {
        this.rssChannelRS = rssChannelRS;
    }

    public RSSCategoryRecordStore getRssCategoryRS() {
        if(rssCategoryRS==null){
            rssCategoryRS = new RSSCategoryRecordStore();
        }
        return rssCategoryRS;
    }

    public void setRssCategoryRS(RSSCategoryRecordStore rssCategoryRS) {
        this.rssCategoryRS = rssCategoryRS;
    }

    public CategoryRecordStore getCategoryRS() {
        if(categoryRS==null){
            categoryRS = new CategoryRecordStore();
        }
        return categoryRS;
    }

    public void setCategoryRS(CategoryRecordStore categoryRS) {
        this.categoryRS = categoryRS;
    }
}

